//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml
{
    class OfficeShapeAttributes: IOfficeXmlSerializable
    {
        //AG_OfficeShapeAttributes

        string _spt;
        public string SPt
        {
            get
            {
                return _spt;
            }
            set
            {
                _spt = value;
            }
        }
        string _connectortype;
        public string ConnectorType
        {
            get
            {
                return _connectortype;
            }
            set
            {
                _connectortype = value;
            }
        }
        string _bwmode;
        public string BWMode
        {
            get
            {
                return _bwmode;
            }
            set
            {
                _bwmode = value;
            }
        }
        string _bwpure;
        public string BWPure
        {
            get
            {
                return _bwpure;
            }
            set
            {
                _bwpure = value;
            }
        }
        string _bwnormal;
        public string BWNormal
        {
            get
            {
                return _bwnormal;
            }
            set
            {
                _bwnormal = value;
            }
        }
        string _forcedash;
        public string ForceDash
        {
            get
            {
                return _forcedash;
            }
            set
            {
                _forcedash = value;
            }
        }
        string _oleicon;
        public string OleIcon
        {
            get
            {
                return _oleicon;
            }
            set
            {
                _oleicon = value;
            }
        }
        string _ole;
        public string Ole
        {
            get
            {
                return _ole;
            }
            set
            {
                _ole = value;
            }
        }
        string _preferrelative;
        public string PreferRelative
        {
            get
            {
                return _preferrelative;
            }
            set
            {
                _preferrelative = value;
            }
        }
        string _cliptowrap;
        public string ClipToWrap
        {
            get
            {
                return _cliptowrap;
            }
            set
            {
                _cliptowrap = value;
            }
        }
        string _clip;
        public string Clip
        {
            get
            {
                return _clip;
            }
            set
            {
                _clip = value;
            }
        }
        // ShapeAttributes



        #region IOfficeXmlSerializable Members

        public void ReadXml(ReadContext c)
        {
            SPt = c.GetOptionalString(VmlConstants.OfficeNamespace +  "spt");
            ConnectorType = c.GetOptionalString(VmlConstants.OfficeNamespace +  "connectortype");
            BWMode = c.GetOptionalString(VmlConstants.OfficeNamespace + "bwmode");
            BWPure = c.GetOptionalString(VmlConstants.OfficeNamespace +  "bwpure");
            BWNormal = c.GetOptionalString(VmlConstants.OfficeNamespace +  "bwnormal");
            ForceDash = c.GetOptionalString(VmlConstants.OfficeNamespace + "forcedash");
            OleIcon = c.GetOptionalString(VmlConstants.OfficeNamespace + "oleicon");
            Ole = c.GetOptionalString(VmlConstants.OfficeNamespace + "ole");
            PreferRelative = c.GetOptionalString(VmlConstants.OfficeNamespace + "preferrelative");
            ClipToWrap = c.GetOptionalString(VmlConstants.OfficeNamespace + "cliptowrap");
            Clip = c.GetOptionalString(VmlConstants.OfficeNamespace + "clip");
        }

        public void WriteXml(WriteContext c)
        {
            c.SetOptionalString(VmlConstants.OfficeNamespace + "spt", SPt);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "connectortype", ConnectorType);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "bwmode", BWMode);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "bwpure", BWPure);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "bwnormal", BWNormal);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "forcedash", ForceDash);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "oleicon", OleIcon);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "ole", Ole);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "preferrelative", PreferRelative);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "cliptowrap", ClipToWrap);
            c.SetOptionalString(VmlConstants.OfficeNamespace + "clip", Clip);
        }

        #endregion
    }

}
